﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace AISFMIOperator
{
    public partial class FacilityTypeForm : Form
    {
        public FacilityTypeForm()
        {
            InitializeComponent();
            RefreshFacilityTypeTable();
        }

        private void FacilityTypeForm_Load(object sender, EventArgs e)
        {

        }

        private void RefreshFacilityTypeTable()
        {
            dataGridView1.AutoGenerateColumns = false;
            dataGridView1.DataSource = FacilityType.GetAllFacilityTypes();
            dataGridView1.Columns[0].DataPropertyName = "FacilityTypeName";
        }

        private void button6_Click(object sender, EventArgs e)
        {
            AddFacilityTypeForm aft = new AddFacilityTypeForm();
            aft.ShowDialog();
            RefreshFacilityTypeTable();            
        }
    }
}
